home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Finders Peekers
/
Read Me - FSM Client
next >
Wrap
Text File
|
2000-06-23
|
3KB
|
72 lines
File System Client Framework
----------------------------
FS Code and this ReadMe by Thomas Tempelmann (fsm@tempel.org)
Resource scanning, CMM and supporting code by Florian Dejako (fdj@elgato.com)
Written at MacHack #15, June 22-24, 2000
Purpose
-------
The main code is essentially a framework for writing read-only
file systems. It was derived from the freeware Joliet File System,
available at http://www.tempel.org/joliet/
All ISO/Joliet code has been stripped out and been replaced by
a simplified module that is all you have to modify when you
have some source of tree-like data to display through a file
system.
Programming information
-----------------------
The File System project is "FSM Client.mcp". It was developed under
CW Pro 5.3.
The project contains three samples, all their differences are
found in the files "FS API.cp", FS API 2.cp" and "FS API 3.cp".
The targets are, respetively, "App", "App 2" and "App 3", which
all compile into applications: if you launch them, the file
system is installed, when quitting, the FS will be removed again,
which is very helpful in the development phase.
However, be aware that you can not use high-level debuggers,
like CodeWarrior's, but only low-level, like MacsBug or the dcon
output console.
There's also examples on how to make a INIT and a loadable code-rsrc
(see "CODE rsrc" and "Loader App") in the various targets.
So, have a look at "FS API.cp" in order to see how to provide
items for a volume. It will only show one, invariable, file in the
root dir to keep it simply.
Next, check out the "App 3" target, which creates some dynamic content,
and last the "App 2", which shows how to build deeper folders.
Running the sample apps
-----------------------
After launching "App" and "App 3", you also need to run
"Disk Driver mounting", which will install a pseudo drive that will
then call PBMountVol in order to allow the File System to mount
its volume.
To use "App 2", you must launch it first, then launch
"Disk Driver no mount", which install a drive (with fixed drvNum 64),
and last you need to drop some file with resources onto "ResFS Support",
which will then scan the resources of that file, will build a table,
then mount the drive #64, with passing the table to the file system,
which will then show the resource items as a directory structure.
Final words
-----------
The code was hacked to together in a stressful but exciting weekend
at MacHack (http://www.machack.com), and has not been polished too
well. There's still some construction areas left, and if you are
serious about using this code, you may contact the author of the
FS (Thomas Tempelmann) to get some help or updated versions of this
code.
Enjoy!